{% ifnotequal username None%}
<html>
<head>
<title>服务安装</title>
{% include "systy.html" %}
</head>
<body>
{% include "head6.html" %}
<div class="ms_div">
    <div class="location_div">位置：系统管理 >> 系统管理 </div>
    <form action="" method="post">
        <div class="ms_install_div1">    
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">服务安装</h3>
                </div>
                <div class="panel-body">
                    <div class="ms_install_div2">
                        <div class="input-group">
                            <span class="input-group-addon">选择服务器</span>
                            <select name="select" id="select">
                                <option selected value="-1">选择服务器</option>
                                {% for ip in iplist %}
                                    <option {% ifequal ID ip.id %} selected {% endifequal %} value="{{ ip.id }}">{{ ip.ip }}（{{ip.alias}}）</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="ms_install_div3">
                        <div class="input-group">
                            <span class="input-group-addon">选择服务</span>
                            <select name="select2" id="select2">
                                <option selected value="-1">选择服务</option>
                                {% for i in server_list %}
                                    <option {% ifequal PATH i.spath %} selected {% endifequal %} value="{{ i.spath }}">{{ i.sname }}</option>
                                {% endfor %}
                                
                            </select>
                        </div>
                    </div>
                    <div class="ms_install_div4">
                        <button type="submit" class="btn btn-primary btn-sm ms_install_botton" name="install"> 安 装 </button>
                    </div>               
                </div>
            </div>
        </div>  
        {% if DATA %}  
        <div class="ms_install_div5">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <h3 class="panel-title">返回安装信息</h3>
                </div>
                <div class="panel-body">
                    {% for i in DATA%}
                        {% if forloop.last %}
                        {{ i }}
                        {% endif %}
                    {% endfor %} 
                </div>
            </div>
        </div>
        {% endif %}
        <div class="ms_install_div1">    
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">服务管理</h3>
                </div>
                <div class="panel-body">
                    <div class="ms_install_div2">
                        <div class="input-group">
                            <span class="input-group-addon">选择服务器</span>
                            <select name="select3" id="select3">
                                <option selected value="-1">选择服务器</option>
                                {% for ip in iplist %}
                                    <option {% ifequal ID ip.id %} selected {% endifequal %} value="{{ ip.id }}">{{ ip.ip }}（{{ip.alias}}）</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="ms_install_div3">
                        <div class="input-group">
                            <span class="input-group-addon">选择服务</span>
                            <select name="select4" id="select4">
                                <option selected value="-1">选择服务</option>
                                {% for i in mserver_list %}
                                    <option {% ifequal SID i.id %} selected {% endifequal %} value="{{ i.id }}">{{ i.Mname }}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="ms_install_div3">
                        <div class="input-group">
                            <span class="input-group-addon">选择操作</span>
                            <select name="select5" id="select5">
                                <option selected value="-1">选择操作</option>
                                <option {% ifequal SM "1" %} selected {% endifequal %} value="1">启动（start）</option>
                                <option {% ifequal SM "2" %} selected {% endifequal %} value="2">重启（restart）</option>
                                <option {% ifequal SM "3" %} selected {% endifequal %} value="3">停止（stop）</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="ms_install_div4">
                        <button type="submit" class="btn btn-primary btn-sm ms_install_botton" name="server"> 执 行 </button>
                    </div>
                </div>
            </div>
        </div>  
        {% if MDATA %}
        <div class="ms_install_div5">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <h3 class="panel-title">返回管理信息</h3>
                </div>
                <div class="panel-body">
                    {% for i in MDATA%}
                        {{ i }}</br>
                    {% endfor %}
                </div>
            </div>
        </div>
        {% endif %}
    </form>
</div>
</body>
</html>

{% else %}
    你无权访问，请<a href="/login.html">登陆!</a>
{% endifnotequal%}
